#include <bits/stdc++.h>
using namespace std;
void benchmark(const string &name, const auto &func) {
  auto start = chrono::high_resolution_clock::now();
  func();
  auto end = chrono::high_resolution_clock::now();
  auto duration = chrono::duration_cast<chrono::milliseconds>(end - start);
  cout << format("{} execution time: {} ms\n", name, duration.count());
}

struct FourString {
  string a, b, c, d;
  FourString() {}
  FourString(string a, string b, string c, string d): a(a), b(b), c(c), d(d) {}
};
int main() {
  int n = 100000;
  vector<FourString> input(n);
  for (auto &[a, b, c, d] : input) {
    for (int i = 0; i < 1000; i ++) {
      a += rand() % 26 + 'a';
      b += rand() % 26 + 'a';
      c += rand() % 26 + 'a';
      d += rand() % 26 + 'a';
    }
  }
  
  benchmark("push_back", [&]() {
    vector<FourString> vec;
    for (auto &[a, b, c, d] : input) {
      vec.push_back(move(FourString(a, b, c, d)));
    }
  });

  benchmark("emplace_back", [&]() {
    vector<FourString> vec;
    for (auto &[a, b, c, d] : input) {
      vec.emplace_back(move(a), move(b), move(c), move(d));
    }
  });
}